﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CANO.Data.DAOs
{
	public class ZonaDAO
	{
		public int ZonaID { get; set; }
		public string Zona { get; set; }

		public static List<ZonaDAO> getAll()
		{
			using (dcCanoDataContext context = new dcCanoDataContext())
			{
				List<ZonaDAO> listZona = new List<ZonaDAO>();

				var zonaColl =
					from z in context.Zonas
					select z;

				foreach (var zona in zonaColl)
				{
					listZona.Add(new ZonaDAO { Zona = zona.Zona1, ZonaID = zona.ZonaID });
				}

				return listZona;
			}
		}
	}
}
